import request from '@/utils/request'

// 查询课程列表
export function courseList(data, pageNum = 1, pageSize = 10) {
  return request({
    url: `/student/course/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'post',
    data
  })
}

// 删除课程
export function delCourse(id) {
  return request({
    url: '/course/removeById?request=' + id,
    method: 'post',
    data: {}
  })
}

// 新增/修改课程
export function addOrUpdateCourse(data) {
  return request({
    url: '/course/addOrUpdate',
    method: 'post',
    data: data
  })
}

// 获取课程详情
export function getStudentCourseById(id) {

  return request({
    url: '/student/course/getStudentCourseInfoById?request=' + id,
    method: 'post',
    data: {}
  })
}

// 审核课程
export function auditCourse(data) {
  return request({
    url: '/student/course/auditCourse',
    method: 'post',
    data: data
  })
}


// 学生选课
export function chooseCourses(data) {
  return request({
    url: '/student/chooseCourses',
    method: 'post',
    data: data
  })
}
